package com.cgg.stock.client;

import com.cgg.stock.common.pojo.User;
import com.cgg.stock.common.util.ResponseData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;

@FeignClient(value="user-service")
@RequestMapping("user")
public interface UserClient {

    //对应服务的Controller的方法签名
    @GetMapping("user/{uid}")
    public User queryUserById(@PathVariable("uid") Long uid);

    @PostMapping("/changeAccountBalance")
    public ResponseData ChangeAccountBalance(@RequestParam("account") Long account, @RequestParam("amount")BigDecimal amount, @RequestParam("count")int count);

}
